package com.travel.server.manager.impl.youzan;

/**
 * @Author: LiZhenhui
 * @Date: 2018/12/17 16:55
 * @Desc:
 */
public enum YouzanItemTypeEnum {

    PUTONG(0L, "普通类型商品"),
    PAIMAI(1L, "拍卖商品"),
    CANYIN(5L, "餐饮商品"),
    FENXIAO(10L, "分销商品"),
    HUIYUANKA(20L, "会员卡商品"),
    LIPINKA(21L, "礼品卡商品"),
    YOUZANHUIYI(23L, "有赞会议商品"),
    ZHOUQIGOU(24L, "周期购"),
    SHOUYINTAI(30L, "收银台商品"),
    ZHISHIFUFEI(31L, "知识付费商品"),
    JIUDIAN(35L, "酒店商品"),
    PUTONGFUWULEI(40L, "普通服务类商品"),
    PUTONGXUNI(182L, "普通虚拟商品"),
    DIANZIKAQUAN(183L, "电子卡券商品"),
    WAIBUHUIYUANKA(201L, "外部会员卡商品"),
    WAIBUSHOUKUAN(202L, "外部直接收款商品"),
    WAIBUPUTONG(203L, "外部普通商品"),
    MOCK(205L, "mock不存在商品"),
    ERWEIMA(206L, "小程序二维码");;

    private Long type;

    private String desc;

    YouzanItemTypeEnum(Long type, String desc){
        this.type = type;
        this.desc = desc;
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByType(Long type){
        for(YouzanItemTypeEnum item : YouzanItemTypeEnum.values()){
            if(item.getType().equals(type)){
                return item.getDesc();
            }
        }
        return null;
    }
}
